Contents
- 1. Introduction
- 2. Adding Nodes
- 3. Removing Nodes
- 4. TreeView Styles
- 5. Using Images
- 6. Editing Labels
- 7. Expanding Items
- 8. Drag and Drop
Downloads
Related Categories
TreeView Control - Introduction
Introduction
The Tree View control is a Visual Basic version of the control you see used in many programs, including Explorer and FrontPage, used to list the folders on your hard disk. This control allows you to add nodes to a tree, each of which can have sub items. Below is an image of the Tree View control in use.
![]()
The Tree View control comes with all editions of Visual Basic, except the standard version.
To add a list view control to your project, goto Project|Components. Now scroll down to Microsoft Common Controls and check the box next to it. Click OK. You will now see a number of new controls added to your toolbox. The TreeView icon looks like this:
![]()
James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.